<template>
  <div class="hm-num">
    <h2>{{ value }}</h2>
    <button @click="btnClick">点击++</button>
  </div>
</template>
<script>
export default {
  props: {
    value: {
      type: Number
    }
  },
  methods: {
    btnClick () {
      this.$emit('input', this.value + 1)
    }
  }
}
</script>
<style lang="less" scoped>
.hm-num {
  width: 300px;
  height: 300px;
  border: 5px solid red;
}
</style>
